<?php
class Form_Login extends Zend_Form {
   
    public function init()
    {
        // Вызываем родительский метод
        parent::init();
        $this->setAction('/index/login');
        $this->setMethod('post');
        $this->setAttrib('class', 'register');

        $email = new Form_Element_Email('email');
        $email->setAttrib('required', true);
        $this->addElement($email);

        $password = new Form_Element_Password('password');
        $password->setAttrib('required', true);
        $this->addElement($password);
        //TODO: add functionality
        $rememberMe = new Zend_Form_Element_Checkbox('rememberMe');
        $rememberMe->setLabel('Remember Me');
        
        $submit = new Zend_Form_Element_Submit('submit', array(
            'label' => 'Login',
        ));      
        $this->addElement($submit);

        $this->addDisplayGroup(
            array('email', 'password', 'submit'), 'loginDataGroup',
            array(
                'legend' => 'Login data'
            )
        );

    }
}